//package com.felight.examples.inheritence;

/* class Father
 {
	String homeOne ="Sri Ganesh";
	boolean smokes;

	String badBehaviour(int money)
		{
			smokes = true;
			if(smokes == true)
				{
				money--;
				}
			return "pain";
		}
} */

public class Son extends Father
 {


//} 

/*
class Father
 {
	String homeOne = "Sri Ganesh";
	boolean smokes;

	String badBehaviour(int money)
	{
		smokes = true;
		if(smokes == true)
			{
				money--;
			}
		return "pain";
	}
} */

//	public class Son extends Father
//	{
	boolean drinks;
	String baadBehaviour(int money)
	{
	drinks= true;
	if(drinks)
		{
			money--;
			return "pain to parents";
		}
	else
		{
			return "Good boy";
		}
//	}
} /*

class Father
 {
	String homeOne = "Sri Ganesh";
	boolean smokes;

	String badBehaviour(int money)
	{
		smokes = true;
		if(smokes == true)
			{
				money--;
			}
		return "pain";
	}
} */

//	public class Son extends Father
//	{
	boolean drugs;

	String badBehaviour(int money)
		{
			String resultFromFatherBehaviour = super.badBehaviour(money);
			drugs= true;
			if(drugs)
			{
				money--;
				return resultFromFatherBehaviour + "Pain to parents";
			}
			else
				{
					return "Good Boy";
				}
		}
//	}
	}


